package com.ccnu.JobHub.model.database;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
import java.util.List;

@TableName("comments")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comment {
    @TableId("comment_id")
    private Integer commentId;

    @TableField("post_id")
    private Integer postId;

    @TableField("parent_comment_id")
    private Integer parentCommentId;

    @TableField("student_id")
    private Integer studentId;

    @TableField("content")
    private String content;

    @TableField("created_at")
    private Timestamp createdAt;

    @TableField("like_num")
    private Integer likeNum;

    @TableField("dislike")
    private Integer dislike;
    // 所有的子评论
    private transient List<Comment> sonComments;
    // 代表此人的昵称
    private transient String nickname;
    // 代表回复的人
    private transient String replyName;
//    private transient String avatar;
}
